<?php
/* Reflux
*  Author: Zengjunjie <info@mrzenix.com>
*  File: /trunk/htdocs/core/GlobalCore.php
*  Usage: 
*  Format: 1 tab indent(2 spaces), LF, UTF-8, no-BOM
*
*  Subversion Keywords:
*
*  $Id: GlobalCore.php 10 2009-07-22 18:21:02Z mrzenix@gmail.com $
*  $LastChangedDate: 2009-07-22 18:21:02 +0000 (Wed, 22 Jul 2009) $
*  $LastChangedRevision: 10 $
*  $LastChangedBy: mrzenix@gmail.com $
*  $URL: http://reflux.googlecode.com/svn/trunk/htdocs/core/GlobalCore.php $
*
* Copyright (C) 2009 Zengjunjie <info@mrzenix.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

/**
* Kill Reflux execution and display HTML message with error message.
*
* Call this function to display Error message for user. If any error
* will found in another function then can call it to kill Reflux.
* This function will called die() PHP function.
* @since 0.01
* @return void
* @author mrzenix
*
* @param string $message Error message.
* @param string $title Error title.
* @param string|array $args Optional arguements to control behaviour.
*/
function rx_die($message,$title='',$args = array()){
?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title><?php echo $title ?></title>
  <?//<link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install.css" type="text/css" />?>
  <? //<link rel="stylesheet" href="css/install-rtl.css" type="text/css" />?>
  </head>
  <body id="error-page">
	<?php echo $message; ?>
  </body>
  </html>
  <?php
	die();
}
?>